﻿@using Kojarskiy.Core
@using Kojarskiy.Models
@{
    var context = new KojarskiyDbEntities();
    var phones1 = context.Settings.First(x => x.Name == "DATA_PHONES_1");
    var phones2 = context.Settings.First(x => x.Name == "DATA_PHONES_2");
}
<!DOCTYPE html>
<html lang="en">
    <head>
        <title>@ViewBag.Title</title>
        <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <meta name="viewport" content="width=device-width" />

        <meta name="description" content="@ViewBag.Description" />
        <meta name="keywords" content="@ViewBag.Keywords" />
                
        @*Styles*@
        <link type="text/css" rel="Stylesheet" href="@Url.Content("~/Content/bootstrap.css")" />
        <link type="text/css" rel="Stylesheet" href="@Url.Content("~/Content/bootstrap-theme.css")" />

        <link type="text/css" rel="stylesheet" href="@Url.Content("~/Content/jquery.treeview.css")" />  
        <link type="text/css" rel="stylesheet" href="@Url.Content("~/Content/bootstrap-editable.css")" />
        <link type="text/css" rel="stylesheet" href="@Url.Content("~/Content/bootstrap-editable-address.css")" />
        <link type="text/css" rel="stylesheet" href="@Url.Content("~/Content/bootstrap-slider.css")" />

        <link type="text/css" rel="Stylesheet" href="@Url.Content("~/Content/jquery.bxslider.css")" />   
             
        <link type="text/css" rel="stylesheet" href="@Url.Content("~/Content/style.css")" />  

        <link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/jquery.fancybox.css?v=2.1.5")" media="screen" />
        <link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/jquery.fancybox-buttons.css?v=1.0.5")" />
        <link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/jquery.fancybox-thumbs.css?v=1.0.7")" />
        
        <link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/jquery.gridster.css")" />

        @*Scripts*@
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
        <script type="text/javascript" src="@Url.Content("~/Scripts/jquery.gridster.with-extras.min.js")"></script>
        
        <script type="text/javascript" src="@Url.Content("~/Scripts/jquery.hashchange.min.js")"></script>
        <script type="text/javascript" src="@Url.Content("~/Scripts/script.js")"></script>
        <script type="text/javascript" src="@Url.Content("~/Scripts/bootstrap.min.js")"></script>
        <script type="text/javascript" src="@Url.Content("~/Scripts/bootstrap-editable.min.js")"></script>
        <script type="text/javascript" src="@Url.Content("~/Scripts/bootstrap-editable-address.js")"></script>
        <script type="text/javascript" src="@Url.Content("~/Scripts/bootbox.min.js")"></script>
        <script type="text/javascript" src="@Url.Content("~/Scripts/bootstrap-slider.js")"></script>
        <script type="text/javascript" src="@Url.Content("~/Scripts/jquery.bxslider.min.js")"></script>

        @*Editor*@
        <script type="text/javascript" src="@Url.Content("~/ckeditor/ckeditor.js")"></script>

        <script src="@Url.Content("~/Scripts/jquery.treeview.js")" type="text/javascript"></script>   
        
        @*fancybox*@
	    <script type="text/javascript" src="@Url.Content("~/Scripts/jquery.fancybox.js?v=2.1.5")"></script>
	    <script type="text/javascript" src="@Url.Content("~/Scripts/jquery.fancybox-buttons.js?v=1.0.5")"></script>
        <script type="text/javascript" src="@Url.Content("~/Scripts/jquery.fancybox-thumbs.js?v=1.0.7")"></script>
        
        @RenderSection("AdditionalScripts", false)

        <script type="text/javascript">
            $(document).ready(
                function () {

                    var offset = 220;
                    var duration = 500;

                    $(window).scroll(function () {
                        if (jQuery(this).scrollTop() > offset) {
                            jQuery('.back-to-top').fadeIn(duration);
                        } else {
                            jQuery('.back-to-top').fadeOut(duration);
                        }
                    });

                    $('.back-to-top').click(function (event) {
                        event.preventDefault();
                        jQuery('html, body').animate({ scrollTop: 0 }, duration);
                        return false;
                    });
                }
            );
        </script> 
        
        <script>
            (function (i, s, o, g, r, a, m) {
                i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
                    (i[r].q = i[r].q || []).push(arguments)
                }, i[r].l = 1 * new Date(); a = s.createElement(o),
                m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
            })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

            ga('create', 'UA-51314551-1', 'kojarskiy.com.ua');
            ga('send', 'pageview');

        </script>

    </head>
    <body>
        
        @if (User.IsInRole("Administrators"))
        {
            @Html.Partial("_Administration")
        }
        <div id="wrapper">
            <div id="header">
                <div class="header-left">
                    <div id="logo">
                        <a href="@Url.Action("Index", "Home")" target="_parent"  class="logo-text-link">
                            <div class="logo-text">@Localization.GetLocalizedValue("LOGO_TEXT")</div>
                            <div class="logo-text-small">@Localization.GetLocalizedValue("LOGO_TEXT_SMALL")</div>
                            <div style="text-align: center;">@Localization.GetLocalizedValue("LOGO_DESCRIPTION")</div>
                        </a>
                    </div>
                </div>
                <div class="header-right">
                    <div class="phones">                       
                        @Html.Raw(phones1.Value)
                    </div>
                    
                    <div class="phones">                       
                        @Html.Raw(phones2.Value)
                    </div>
               
                    <div class="login">
                        @Html.Partial("_Language")                    
                        @Html.Partial("_LoginPartial")
                    </div>
                </div>
        
                @Html.Partial("_Menu")
   
                <div class="cleaner"></div>

            </div> <!-- end of header -->
        </div> <!-- end of header wrapper -->
        <div id="slider-wrapper">
            @RenderSection("Slider", false)
        </div>
        <div id="content_wrapper_outer">
            <div id="content_wrapper_inner">

                <div id="content_wrapper">        
        
                    @RenderBody()

                    <div class="cleaner"></div>
                </div>
            </div>
        </div>        

        <div id="footer_wrapper">
            <div id="footer">
                Copyright © 2014 @Localization.GetLocalizedValue("COMPANY_NAME")
                <div style="float: right; padding-right: 30px;">
                    <a href="#">
                        <div class="bwSocial">
                            <img src="@Url.Content("~/Content/Images/social_tw.png")"/>
                        </div>
                    </a>
                    <a href="#">
                        <div class="bwSocial">
                            <img src="@Url.Content("~/Content/Images/social_fb.png")"/>
                        </div>
                    </a>
                    <a href="#">
                        <div class="bwSocial">
                            <img src="@Url.Content("~/Content/Images/social_vk.png")" />
                        </div>
                    </a>
                </div>
            </div>

        </div>

        <a href="#" class="back-to-top"><img src="@Url.Content("~/Content/Images/back-to-top.png")" /></a>
        
        <script type="text/javascript">
            $('#footer_wrapper').css('margin-top', $(document).height() - ($('#wrapper').height() + $('#content_wrapper_outer').height() + $('#slider-wrapper').height()) - $('#footer_wrapper').height());
        </script>        

    </body>
</html>
